<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>401</title>
<link href="{{url_for('static',filename='401/css/404.css')}}" rel="stylesheet" type="text/css" />
<script src="{{url_for('static',filename='401/js/jquery-1.7.2.min.js')}}"></script>
<script type="text/javascript">
    $(function() {
        var h = $(window).height();
        $('body').height(h);
        $('.mianBox').height(h);
        centerWindow(".tipInfo");
    });

    //2.将盒子方法放入这个方，方便法统一调用
    function centerWindow(a) {
        center(a);
        //自适应窗口
        $(window).bind('scroll resize',
                function() {
                    center(a);
                });
    }

    //1.居中方法，传入需要剧中的标签
    function center(a) {
        var wWidth = $(window).width();
        var wHeight = $(window).height();
        var boxWidth = $(a).width();
        var boxHeight = $(a).height();
        var scrollTop = $(window).scrollTop();
        var scrollLeft = $(window).scrollLeft();
        var top = scrollTop + (wHeight - boxHeight) / 2;
        var left = scrollLeft + (wWidth - boxWidth) / 2;
        $(a).css({
            "top": top,
            "left": left
        });
    }
</script>
</head>
<body>
<div class="mianBox">
    <img src="{{url_for('static',filename='401/images/yun0.png')}}" alt="" class="yun yun0" />
    <img src="{{url_for('static',filename='401/images/yun1.png')}}" alt="" class="yun yun1" />
    <img src="{{url_for('static',filename='401/images/yun2.png')}}" alt="" class="yun yun2" />
    <img src="{{url_for('static',filename='401/images/bird.png')}}" alt="" class="bird" />
    <img src="{{url_for('static',filename='401/images/san.png')}}" alt="" class="san" />
    <div class="tipInfo">
        <div class="in">
            <div class="textThis">
                <h2>1.您没有权限访问</h2>
                <h2>2.您未登录</h2>
                <h2>3.未知错误</h2>
                <p><span>等待<b id="wait">10</b>秒</span><span>页面自动<a id="href" href="javascript:history.back(-1);">跳转</a></span></p>
                <p><span><a href="{{url_for('public.home')}}">返回主页</a></span>
                <span><a href="{{url_for('public.register')}}">注册用户</a></span>
                <span><a href="{{url_for('public.login')}}">用户登录</a></span>
                </p>
                <script type="text/javascript">                            (function() {
                        var wait = document.getElementById('wait');
                        var href = document.getElementById('href').href;
                        var interval = setInterval(function() {
                            var time = --wait.innerHTML;
                            if (time <= 0) {
                                location.href = history.back(-1);
                                clearInterval(interval);
                            }
                            ;
                        }, 1000);
                    })();
                </script>
            </div>
        </div>
    </div>
</div>


</body>
</html>
